package com.overoid.diary.ui.common;



import android.content.Context;

import android.graphics.drawable.Drawable;
import android.net.Uri;

import android.util.AttributeSet;

import android.widget.VideoView;
import android.widget.ViewSwitcher;


public class VideoSwitcher extends ViewSwitcher
{
    public VideoSwitcher(Context context)
    {
    	
        super(context);
        
    }
    
    public VideoSwitcher(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public void setVideoResource(Uri uri)
    {
    	 VideoView video = (VideoView)this.getNextView();
    	 video.setVideoURI(uri);
         showNext();
    }
    
    public void setVideoPath(String path)
    {
    	 VideoView video = (VideoView)this.getNextView();
    	 video.setVideoPath(path);
         showNext();
    }

    public void setVideoURI(Uri uri)
    {
    	VideoView video = (VideoView)this.getNextView();
   	 	video.setVideoURI(uri);
        showNext();
    }
}